/**
 * desc: app configuration
 * author: Joe
 * date: 7/5/2018
 */

/* environment
----------------------------------------------------------------------------- */
var env = 'test';
// var env = 'test';
// var env = 'pre';
// var env = 'prod';

var conf = {
  // development env
  dev: {
    baseUrl: '../mocks/'
  },

  // test env
  test: {
    // baseUrl: 'http://192.168.1.251:8080', // lian
    // baseUrl: 'http://192.168.1.68:8080', // 史昕
    // baseUrl: 'http://192.168.1.66:8080',   // 程章恒
    //baseUrl: 'http://192.168.1.74:8080',   // 赵存伟
    // baseUrl: 'http://192.168.1.30:8080',   // 测试地址
    baseUrl:'http://hycs.d-chance.cn:7000',  //测试域名接口地址
  },

  // pre-production env
  pre: {
    baseUrl: '../mocks/',
  },

  // production env
  prod: {
    baseUrl: '../mocks/'
  }
};
var apis = {
  getLearnLinkList: 'http://www.lovejavascript.com/learnLinkManager/getLearnLinkList',
  login: '/api/Manager/login', // 登录
  getAttender: '/api/Meeting/getAttender',
  getSponsor: '/api/Meeting/getSponsor',
  getSponsorVoucher: '/api/Meeting/getSponsorVoucher',
  getMeetList: '/api/Meeting/getMeetList',
  getVoucherInfo: '/api/Meeting/getVoucherInfo',
  getSponsorInfo: '/api/Meeting/getSponsorInfo',
  getAttendInfo: '/api/Meeting/getAttendInfo',
  showUserList: '/user/showUserList', // 用户管理列表有人
  addUser: '/user/addUser', // 用户管理-添加用户
  editSure: '/user/editSure', // 用户管理-编辑用户
  showRoleList: '/role/showRoleList ', // 角色管理列表
  addRole: '/role/addRole', // 角色管理 添加用户
  getAttachmentById: 'http://', // 根据附件标识获取附件流
  getOrderList: '/api/Meeting/getOrderList', // 订单查询
  del: '/role/del', // 角色管理 删除用户
  userdel: '/user/del', // 角色管理 删除用户
  updatePass: '/user/updatePass', // 密码重置
  getNewMeeting: '/api/Meeting/promiseDown', //新建会议 承诺书、招商函、邀请函、会议通知下载
  setNewMeeting: '/api/Meeting/attachmentUp', //新建会议 上传承诺书、招商函、邀请函、会议通知
  setAccessory: '/api/Meeting/meetAttachmentEdit', //附件添加
  delAccessory: '/api/Meeting/meetAttachmentDel',  //附件删除
  getAccessory:'/api/Meeting/getMeetAttachmentList', //附件信息回显
  getMeetingCompile: '/api/Meeting/getAttachmentByMeetId', //编辑承诺书、招商函、邀请函、会议通知 回显
  getMeetInfoCompile:'/api/Meeting/getMeetInfo',   //编辑会议信息
  getMeetRecommend:'/api/Meeting/getMeetContent', //编辑会议介绍主信息回显
  setEditMeetBasic:'/api/Meeting/editMeetBasic',   //编辑会议介绍主信息修改
  updateAttachmentByMeetId:'/api/Meeting/updateAttachmentByMeetId', //编辑信息页 承诺书、招商函、邀请函、会议通知 修改
  getMeetSchedule:'/api/Meeting/getMeetSchedule', //会议日程回显
  setMeetSchedule:'/api/Meeting/meetScheduleEdit',//会议日程单独提交
  setMeetAudit:'/api/Meeting/meetExamine',//会议审核
  meetDataOnoff:'/api/Meeting/setMeetOver',//会议资料是否可以上传
  getMeetDataList:'/api/Meeting/getMeetDataList',//获取会议资料列表

  setNewMeetingPage: '/api/Meeting/meetInfoEdit', //新建会议 会议信息填写
  setNewMeetingHome: '/api/Meeting/meetBasicEdit', //新建会议 会议主页
  getObtainAddress: '/api/Meets/getAreaByPID', //获取地点 ///api/Meeting/getAreaByPID
  setMeetingSchedule: '/api/Meeting/meetScheduleEdit', //会议日程

  getOrderInfo: '/api/Meeting/getOrderInfo', //获取订单详情
  updateRoleDetail: '/role/updateRoleDetail', //角色编辑
  templageUp: '/api/Meeting/templateUp', //配置管理—-模板上传
  getTemplage: '/api/Meeting/getTemplate', //配置管理—-获取模板列表
  delTemplate: '/api/Meeting/delTemplate', //配置管理—-模板删除
  auditSponsor: '/api/Meeting/auditSponsor', //赞助---赞助申请审核
  auditSponsorVoucher: '/api/Meeting/auditSponsorVoucher', //赞助--赞助支付凭证审核
  getExamineRecord: '/api/Meeting/getExamineRecord', //待办管理
  getNoticeList: '/api/Notice/getNoticeList', //公告管理
  noticeDel: '/api/Notice/noticeDel', //公告删除
  getMeetExamine: '/api/Meeting/getMeetExamine', //公告删除
  exportOrder: '/api/Meeting/exportOrder', //订单数据导出
  exportMeetuser: '/api/Meeting/exportMeetuser', //导出报名表信息
  exportSign: '/api/Meeting/exportSign', //导出签到表信息
  exportSponsor: '/api/Meeting/exportSponsor', //导出赞助单
  getNotice: '/api/Notice/getNotice', //获取公告信息
  noticeEdit: '/api/Notice/noticeEdit', //获取公告信息
  meetDataFileAdd: '/api/Meeting/meetDataFileAdd', //会议附件添加
  meetDataFileDel: '/api/Meeting/meetDataFileDel', //会议附件删除
  meetDataAdd: '/api/Meeting/meetDataAdd', //会议资料---添加
  getMeetData: '/api/Meeting/getMeetData', //会议资料---获取上传资料信息
  meetDataExamine: '/api/Meeting/meetDataExamine', //会议资料---会议资料审核
  rePassword: '/api/Meeting/rePassword', //会议资料---会议资料审核
  logout:'/api/logout',  //退出消空
  getMeetreject:'/api/Meeting/getMeetreject' , //驳回理由
  rePublishMeet:'/api/Meeting/rePublishMeet'//重新发布会议
};
for (i in apis) {
  apis[i] = conf[env]['baseUrl'] + apis[i];
}
appModule.constant('conf', conf[env || 'prod']);

/* api address
----------------------------------------------------------------------------- */
appModule.constant('api', apis);

/* system setting
----------------------------------------------------------------------------- */
appModule.constant('setting', {
  routeLog: false,
  timeout: 30000,                 // second
  cookieExpire: 24 * 60,         // minute
  cacheMaxAge: 5 * 60 * 1000,    // millisecond
  cacheFlush: 60 * 60 * 1000,    // millisecond
  storagePrefix: '_cmda_cache_',
  smValidatorNode: '.smv-form'
});

